package projet.service;

import projet.dao.ClientDAOInterface;
import projet.dao.DAOFactoryInterface;
import projet.dao.SessionDAOInterface;
import projet.entity.Client;
import projet.entity.Session;

public class AddClientService {
	
	public Session getSession(Long id) {
		DAOFactoryInterface daoFactory = DAOUtil.getDAOFactory();
		SessionDAOInterface sessionDAO = daoFactory.getSessionDAO();
		
		Session s = sessionDAO.getById(id);
		return s;
	}
	
	public void addClient(Client client) {
		DAOFactoryInterface daoFactory = DAOUtil.getDAOFactory();
		ClientDAOInterface clientDAO = daoFactory.getClientDAO();
		
		clientDAO.create(client);
	}

}
